home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d3 / allmac21.arc / GETCOM11.ARC / GETCOM11.QM < prev    next >
Text File  |  1990-08-27  |  16KB  |  331 lines

  1. *               Macro To Get Command & Key From QCONFIG.DAT, v1.1a
  2. *                            GETCOM11.QM
  3. *
  4. * @0 gets a single command and it's key on screen, then removes
  5. * @1 puts command key beside ALL commands in a macro          |
  6. * @2 puts command key beside a single command in a macro      |new v1.1
  7. * @3 makes single column of commands in macro (from COLUMN10) |
  8.  
  9.  
  10. * Version History:
  11. *
  12. *       1.0a - modified Alt_0 to find all multiple commands matching
  13. *              the search criteria.
  14. *       1.1  - added Alt_1/2/3.
  15. *       1.1a - changed documentation and Alt_3 from COLUMN10.
  16.  
  17. * In order for these macros to find a command in QCONFIG.DAT, there must
  18. * be at least four blank spaces betweeen the end of the command key and
  19. * the beginning of the command. If your QCONFIG.DAT has fewer spaces, the
  20. * macros must be modified in the first 'find' line.
  21. *
  22. *
  23. *
  24. *
  25. * Before running, be sure to change the lines with ** below to the
  26. * location of your qconfig.dat. Insert must be ON.
  27.  
  28.  
  29. * To run:
  30. *
  31. * 1. First, you must make a single column macro with Alt_3. To do this,
  32. * place the cursor line anywhere in a macro txtfile (after loading the
  33. * macfile) and press Alt and 3 at the same time.
  34. *
  35. * 2. To find the keys for ALL commands in a macro, place the cursor
  36. * line at the topof a macro txtfile and press Alt_1. An example of this
  37. * output is shown at the end of this file. The keys corresponding to
  38. * each command will be listed also in a single column next to the
  39. * command.
  40. *
  41. * 3. To find the key for a single command in a macro, place the cursor
  42. * line on the command in a macro txtfile and press Alt_2. The key
  43. * corresponding to the command will be listed next to the commmand.
  44. *
  45. *
  46. *
  47. *
  48. * ┌─────────────────────────────────────────────────────────┐
  49. * │ @0 Retrieves a command and it's key from QCONFIG.DAT    │
  50. * └─────────────────────────────────────────────────────────┘
  51. * This macro retrieves a command or all commands matching a selected
  52. * find criteria from your QCONFIG.DAT file, displays the selected
  53. * command(s) and it's key on the screen, and then removes the
  54. * command(s) and it's key from the screen. For those of us who can
  55. * never remember all the commands and can never find our reference
  56. * sheet, this might help.
  57. *
  58. * First, be sure to change "g:\qe\qconfig.dat" in the macro below to
  59. * the location of your qconfig.dat in your setup, and convert.
  60. *
  61. * To run, press Alt_0, then enter the first letter (or more) of the
  62. * command you want to know the key for, press 'Enter' to see the the
  63. * command(s) and it's key, then press 'Enter' again to remove the
  64. * command(s) and it's key from the screen.
  65. *
  66. * For example, to find the key for appendscrbuff, press:
  67. *                      Alt_0
  68. *                     "app"      (no quotes)
  69. *                      Enter
  70. *
  71. * You should see the following highlighted on your screeen:
  72.  
  73. *                                               |
  74. * ^b_a            appendscrbuff                 |
  75.  
  76.  
  77. * Entering "b" instead shows all commands beginning with "b":
  78.  
  79. *                                               |
  80. * ^h              backspace                     |
  81. * ^home           begscreen                     |
  82. * ^pgup           begfile                       |
  83. * home            begline                       |
  84. * backspace       backspace                     |
  85.  
  86.  
  87. *  Press 'Enter' to remove the command(s) and it's key from the screen,
  88. *  or press 'Esc' three times if you want to keep the command(s) on the
  89. *  screen for reference.
  90. *
  91. @0 macrobegin
  92.         unmarkblock                     * unmarkblock
  93.         insertline                      * insert blank line
  94.         markcolumn                      * markcolumn
  95.         currentfilename                 * get currentfilename
  96.         copy                            * get filename to scrap
  97.         delline                         * delline after
  98.         editfile                        *
  99.        "g:\qe\qconfig.dat"             ** CHANGE for your setup **
  100.         return                          * load qconfig.dat
  101.         dropanchor                      * start to clear scrap
  102.         storescrbuff "1" return         * get to scrap
  103.         unmarkblock                     * get ready to find and mark
  104.         begfile                         * go to begin qconfig.dat
  105.         find "    "                     * insert 4 spaces before find
  106.         pause                           * pause for command to find
  107.         return "i" return               * find first command
  108.   jump NEXT:                            *
  109.   START:                                * come here more than 1 find
  110.         find                            * find next command
  111.         return "i" return               *
  112.   NEXT:                                 *
  113.   jfalse FINISH:                        * mark if found, quit if not
  114.         markline                        * mark command line
  115.         begline                         * put at begline
  116.        "* "                             *   asterisk space
  117.         appendscrbuff "1" return        * get to scrbuff
  118.         cursordown                      * move down line
  119.         unmarkblock                     * unmark command
  120.   jump START:                           * see if any more matches
  121.   FINISH:                               * come here after last find
  122.         quit                            * quit qconfig.dat
  123.         editfile paste return           * return to file
  124.         markcolumn                      * start to mark block
  125.         getscrbuff "1" return           * get command and key
  126.         begline                         * get to block begin
  127.         makectrofscreen                 * for better viewing
  128.         pause                           * pause, then 'Enter' to..
  129.         makectrofscreen                 * back to where we were
  130.         deleteblock                     * clean up, remove block
  131. *
  132. * 107 bytes Wed  08-22-1990  21:08:33
  133.  
  134.  
  135. *┌────────────────────────────────────────────────────┐
  136. *│ @1 Puts key beside ALL commands in single column   │
  137. *└────────────────────────────────────────────────────┘
  138. * Does all commands in a macro txtfile
  139. *
  140. @1 macrobegin
  141.         unmarkblock                     * unmarkblock
  142.         insertline                      * insert blank line
  143.         markcolumn                      * markcolumn
  144.         currentfilename                 * get currentfilename
  145.         storescrbuff "1" return         * get to scrbuff
  146.         delline                         * delline after
  147.  START:                                 *
  148.         endline begline                 * line blank? if so end
  149.  jfalse END:                            *
  150.         begline                         * go to begin line
  151.         wordright                       * get to command
  152.         markword                        * mark it
  153.         copy                            * get to scrap
  154.         unmarkblock                     * unmark
  155.         editfile                        *
  156.        "g:\qe\qconfig.dat"             ** CHANGE for your setup **
  157.         return                          * load qconfig.dat
  158.         begfile                         * go to begin qconfig.dat
  159.         FIND "    "                     * insert 4 spaces before find
  160.         paste                           * paste command for find
  161.         return "IW" return              * find command in qconfig.dat
  162.   jfalse NOFIND:                        * mark if found, quit if not
  163.         wordright                       * move cursor to command
  164.         markcolumn                      * markcolumn
  165.         begline                         * go to  begline
  166.        "* "                             * insert asterisk space
  167.         begline                         * go to begline
  168.         markcolumn                      * finish marking key
  169.         storescrbuff "2" return         * get key to scrbuff 1
  170.         cursordown                      * move down line
  171.         unmarkblock                     * unmark command
  172.         quit                            * quit qconfig.dat
  173.         getscrbuff "1" return           * get currentfilename
  174.         cut                             * cut currentfilename
  175.         editfile paste return           * load currentfilename
  176.         markcolumn                      * start to mark block
  177.         gotocolumn "33" return          * postition to get key
  178.         getscrbuff "2" return           * get key
  179.         begline                         * go to begline
  180.         makectrofscreen                 * for better viewing
  181.         cursordown                      * move down to next command
  182.         jump START:                     * start on next command
  183.  NOFIND:                                * come here if no key for command
  184.         getscrbuff "1" return           * get currentfilename
  185.         cut                             * cut currentfilename
  186.         editfile paste return           * return to file
  187.         gotocolumn "33" return          * position to get key
  188.         "* "                            * insert asterisk space
  189.         cursordown                      * move down to next command
  190.         begline                         *
  191.  jump START:                            * do next line till done
  192.  END:                                   *
  193. *
  194. * 143 bytes Wed  08-22-1990  21:08:49
  195.  
  196. *┌───────────────────────────────────────────────────────────┐
  197. *│ @2 Puts key beside command with commands in single column │
  198. *└───────────────────────────────────────────────────────────┘
  199. * Does single commands only
  200. *
  201. @2 macrobegin
  202.         unmarkblock                     * unmarkblock
  203.         insertline                      * insert blank line
  204.         markcolumn                      * markcolumn
  205.         currentfilename                 * get currentfilename
  206.         storescrbuff "1" return         * get to scrbuff
  207.         delline                         * delline after
  208.         begline                         * go to begin line
  209.         wordright                       * get to command
  210.         markword                        * mark it
  211.         copy                            * get to scrap
  212.         unmarkblock                     * unmark
  213.         editfile                        *
  214.        "g:\qe\qconfig.dat"             ** CHANGE for your setup **
  215.         return                          * load qconfig.dat
  216.         begfile                         * go to begin qconfig.dat
  217.         FIND "    "                     * insert 4 spaces before find
  218.         paste                           * paste command for find
  219.         return "IW" return              * find command in qconfig.dat
  220.   jfalse NOFIND:                        * mark if found, quit if not
  221.         wordright                       * move cursor to command
  222.         markcolumn                      * markcolumn
  223.         begline                         * go to  begline
  224.        "* "                             * insert asterisk space
  225.         begline                         * go to begline
  226.         markcolumn                      * finish marking key
  227.         storescrbuff "2" return         * get key to scrbuff
  228.         cursordown                      * move down line
  229.         unmarkblock                     * unmark command
  230.         quit                            * quit qconfig.dat
  231.         getscrbuff "1" return           * get currentfilename
  232.         cut                             * cut currentfilename
  233.         editfile paste return           * load currentfilename
  234.         markcolumn                      * start to mark block
  235.         gotocolumn "33" return          * postition to get key
  236.         getscrbuff "2" return           * get key
  237.         begline                         * go to begline
  238.         makectrofscreen                 * for better viewing
  239.         cursordown                      * move down to next command
  240.         jump END:                       * stop after getting key
  241.  NOFIND:                                * come here if no key for command
  242.         getscrbuff "1" return           * get currentfilename
  243.         cut                             * cut currentfilename
  244.         editfile paste return           * return to file
  245.         gotocolumn "33" return          * position to get key
  246.         "* "                            * insert asterisk space
  247.         cursordown                      * move down to next command
  248.         begline                         *
  249.  END:                                   *
  250. *
  251. * 135 bytes Wed  08-22-1990  21:09:01
  252.  
  253.  
  254. *┌────────────────────────────────────────────────────────┐
  255. *│@3 Makes single column txtfile from any txtfile         │
  256. *│   Uses batch files QMACB.BAT and QMACT-N.BAT           │
  257. *└────────────────────────────────────────────────────────┘
  258. * Macro from COLUMN10.ZIP
  259. *
  260. @3 macrobegin
  261.         writeblock "c:$.qm"             * copy block or file to c:$.qm
  262.         return return                   *
  263. ***************************************** GET CURRENTFILENAME TO SCRAP
  264.         insertline                      * insert blank line
  265.         begline                         *
  266.         dropanchor                      * start mark
  267.         currentfilename                 * get currentfilename
  268.         storescrbuff "1" return         * to scrbuff 1
  269.         cut                             * to scrap
  270. *****************************************
  271.         dos "qmacb c:$"  return  return * make macfile
  272.         dos "qmact-n c:$" return return * make txtfile
  273.         editfile "c:$.qm" return quit   *
  274.         editfile return                 * load c:$.qm
  275.         endfile return                  * insert blank line at end
  276.         "*" insertdate inserttime       * for date/time
  277.         getscrbuff "1" return           * and file name
  278.         unmarkblock                     *
  279.         savefile                        * save c:$.qm
  280. *
  281. * 103 bytes Sun  08-05-1990  17:50:06
  282. * 103 bytes Thu  08-23-1990  14:30:14
  283.  
  284.  
  285. * The following (with star and space added) is the output from first
  286. * running Alt_3, then Alt_1 on the single column macro Alt_3 above.
  287. *
  288. * @3      MacroBegin              *
  289. *         WriteBlock              * @w
  290. *         "c:$."                  *
  291. *         "qm"                    *
  292. *         Return                  * enter
  293. *         Return                  * enter
  294. *         InsertLine              * ^n_i
  295. *         BegLine                 * home
  296. *         DropAnchor              * @a
  297. *         CurrentFilename         * ^n_n
  298. *         StoreScrbuff            * ^b_s
  299. *         "1"                     *
  300. *         Return                  * enter
  301. *         Cut                     * ^c_u
  302. *         Dos ""                  * ^n_o
  303. *         "qmacb "                *
  304. *         "c:$"                   *
  305. *         Return                  * enter
  306. *         Return                  * enter
  307. *         Dos ""                  * ^n_o
  308. *         "qmact-"                *
  309. *         "n c:$"                 *
  310. *         Return                  * enter
  311. *         Return                  * enter
  312. *         EditFile                * f3
  313. *         "c:$."                  *
  314. *         "qm"                    *
  315. *         Return                  * enter
  316. *         Quit                    * @x
  317. *         EditFile                * f3
  318. *         Return                  * enter
  319. *         EndFile                 * ^pgdn
  320. *         Return                  * enter
  321. *         "*"
  322. *         InsertDate              * ^d
  323. *         InsertTime              * ^e
  324. *         GetScrbuff              * ^b_g
  325. *         "1"                     *
  326. *         Return                  * enter
  327. *         UnmarkBlock             * @u
  328. *         SaveFile                * f2
  329. *
  330. * Tom Hogshead   Thu  08-23-1990  14:32:48
  331.